home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Web Graphics with Shout 3D
/
Interactive Web Graphics With Shout 3D.iso
/
mac
/
Code
/
Chapter Code.exe
/
Chapter10
/
CameraCounter.java
< prev
next >
Wrap
Text File
|
2000-07-14
|
638b
|
30 lines
package custom_nodes;
import shout3d.core.*;
import shout3d.*;
import java.awt.*;
public class CameraCounter extends PostRenderEffect{
final public IntField number = new IntField(this, "number", Field.NON_NEGATIVE_INT, 1);
public CameraCounter(){
}
public void filter(Graphics g, int surface_pixel_bits[], float z_buffer[], int deviceWidth, int deviceHeight){
String message = "Camera "+ number.getValue();
g.setFont( new Font("SansSerif", Font.BOLD, 16));
g.setColor(java.awt.Color.gray);
g.drawString(message, 20, 20);
}
}